cmake_minimum_required(VERSION 2.6)

# Déclaration du projet
project(BlobbyKinect)

# Inclusion de la SDL
find_package(SDL REQUIRED)
find_package(SDL_image REQUIRED)
find_package(SDL_ttf REQUIRED)
#find_package(SDL_gfx REQUIRED)
#~ include(FindSDL)
include_directories(${SDL_INCLUDE_DIR})
#~ include(FindSDL_image)
include_directories(${SDLIMAGE_INCLUDE_DIR})
#include_directories(${SDLGFX_INCLUDE_DIR})
include_directories(${SDLTTF_INCLUDE_DIR})
# Mode de compilation debug ou release
IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE Debug CACHE STRING
      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
      FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)

# Génération de la liste des fichiers sources
file(
	GLOB_RECURSE
	source_files
	src/*
)

# Affichage des warnings
add_definitions(-Wall)

# Déclaration de l'exécutable
add_executable(
	blobby
	${source_files}
)

target_link_libraries(blobby ${SDL_LIBRARY})
target_link_libraries(blobby ${SDLIMAGE_LIBRARY})
target_link_libraries(blobby ${SDLTTF_LIBRARY})
target_link_libraries(blobby ${SDLGFX_LIBRARY})
